
package GameEngine;

public class Time{

	private long startTime;
	private long endTime;
	private double moveTime;

	public Time(){
		startTime = 0;
		endTime = 0;
		moveTime = 0.0;
	}

	public void start(){
		this.startTime = System.currentTimeMillis();
	}

	public void end(){
		this.endTime = System.currentTimeMillis();
		this.moveTime =  (this.endTime - this.startTime)/1000.0000000000; //calc MilliSec to Sec

		this.startTime=0;
		this.endTime=0;
	}

	public double getTotalTime(){
		return moveTime;
	}

}